#! /usr/bin/env python
# -*- coding: utf-8 -*-

# *************************************************************
#     Filename @  test.py
#       Author @  Huoty
#  Create date @  2015-06-16 09:44:07
#  Description @  
# *************************************************************

import hashlib

# Script starts from here

md5 = hashlib.md5()
md5.update("I am KHY")
print md5.digest()
print md5.hexdigest()
print "block_size:", md5.block_size
print "digest_size:", md5.digest_size

print '-' * 25, '更简洁的语法', '-' * 25
print hashlib.new("md5", "JGood is a handsome boy").hexdigest()
